/*
 * Part of the ACID Project
 * Developed in 2011 by Morgan Taschuk
 */
package acid.spring.jdbc.services;

import acid.spring.jdbc.repositories.TissueRepository;
import acid.spring.TissueService;
import acid.spring.db.Tissue;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author morgan
 */
@Service
public class JdbcTissueService implements TissueService
{

    @Autowired
    private TissueRepository tissueRepository;

    @Transactional(readOnly = true)
    @Override
    public List<Tissue> listAllTissues()
    {
        return tissueRepository.listAllTissues();
    }

    @Override
    @Transactional( readOnly = true)
    public List<Tissue> matchTissueType(String tissueType)
    {
        return tissueRepository.matchTissueType(tissueType);
    }
}
